package svcContent

import (
	"context"
	"github.com/rs/zerolog"
	"shangke-device/internal/yconf"
	"shangke-device/internal/ylog"
	"shangke-device/internal/ymqtt"
)

type SvcContent struct {
	Conf   *yconf.Conf
	Log    *zerolog.Logger
	Client *ymqtt.Client
}

func NewSvc(conf *yconf.Conf) *SvcContent {
	return &SvcContent{
		Conf:   conf,
		Log:    ylog.NewLog(conf.LogConf),
		Client: ymqtt.NewClient(context.Background(), conf.MqttConf),
	}
}
